<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
<div class="alert alert-success" role="alert">
	<h2>添加员工</h2>
</div>

<form>
	<input class="form-control" type="hidden" name="emp_id" id="emp_id"
		value="${emp.emp_id }">
	<div class="form-group">
		<label for="exampleInputPassword1" class="col-sm-2 control-label">用户名</label>
		<input class="form-control" placeholder="用户名" name="emp_name"
			id="emp_name" value="${emp.emp_name }">

	</div>
	<div class="form-group">
		<label for="exampleInputPassword1" class="col-sm-2 control-label">用户工资</label>
		<input class="form-control" placeholder="用户工资" name="emp_sal"
			id="emp_sal" value="${emp.emp_sal }">
	</div>

	<button type="button" class="btn btn-success  bt-update">确认修改</button>
	<button type="button" onclick="dlg.close();" class="btn btn-success">取消</button>

</form>
<script>
	$(".bt-update").click(function() {
		$.ajax({
			url : "emp.do?operate=updateEmp",
			method : 'post',

			data : $("form").serialize(),
			dataType : "json"
		}).done(function(msg) {
			if (msg.msg == '1') {
				//alert("修改成功");
				swal({
					  title: "修改成功",
					icon : "success",
				}); 
				dlg.close();
				aa();
			} else {

			}
		});
	});
</script>